home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / share / automake-1.8 / am / scripts.am < prev    next >
Encoding:
Text File  |  2005-10-16  |  4.3 KB  |  119 lines

  1. ## automake - create Makefile.in from Makefile.am
  2. ## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2003, 2004
  3. ## Free Software Foundation, Inc.
  4.  
  5. ## This program is free software; you can redistribute it and/or modify
  6. ## it under the terms of the GNU General Public License as published by
  7. ## the Free Software Foundation; either version 2, or (at your option)
  8. ## any later version.
  9.  
  10. ## This program is distributed in the hope that it will be useful,
  11. ## but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. ## GNU General Public License for more details.
  14.  
  15. ## You should have received a copy of the GNU General Public License
  16. ## along with this program; if not, write to the Free Software
  17. ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  18. ## 02111-1307, USA.
  19.  
  20.  
  21. ## ------------ ##
  22. ## Installing.  ##
  23. ## ------------ ##
  24.  
  25. if %?INSTALL%
  26. ## if doesn't work properly for Automake variables yet.
  27. am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
  28. ?BASE?%DIR%SCRIPT_INSTALL = $(INSTALL_SCRIPT)
  29. ?!BASE?%DIR%SCRIPT_INSTALL = $(install_sh_SCRIPT)
  30. ?EXEC?.PHONY install-exec-am: install-%DIR%SCRIPTS
  31. ?!EXEC?.PHONY install-data-am: install-%DIR%SCRIPTS
  32. install-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
  33.     @$(NORMAL_INSTALL)
  34.     test -z "$(%NDIR%dir)" || $(mkdir_p) "$(DESTDIR)$(%NDIR%dir)"
  35. ?!BASE?    @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
  36. ## Funny invocation because Makefile variable can be empty, leading to
  37. ## a syntax error in sh.
  38. ?!BASE?    list='$(%DIR%_SCRIPTS)'; for p in $$list; do \
  39. ?BASE?    @list='$(%DIR%_SCRIPTS)'; for p in $$list; do \
  40. ?!BASE?      case $$p in \
  41. ?!BASE?        $(srcdir)/*) p=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
  42. ?!BASE?      esac; \
  43. ## A file can be in the source directory or the build directory.
  44.       if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
  45.       if test -f $$d$$p; then \
  46. ## If the _SCRIPTS variable has an entry like foo/bar, install it as
  47. ## $(destdir)/bar, not $(destdir)/foo/bar.  The user can make a
  48. ## new dir variable or use a nobase_ target for the latter case.
  49. ## However in all cases $(transform) applies only to the basename,
  50. ## so we have to strip the directory part.
  51.         f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
  52. ## Prepend the directory part if nobase_ is used.
  53. ?!BASE?        f=`echo "$$p" | sed 's|[^/]*$$||'`"$$f"; \
  54.         echo " $(%DIR%SCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
  55.         $(%DIR%SCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(%NDIR%dir)/$$f"; \
  56.       else :; fi; \
  57.     done
  58. endif %?INSTALL%
  59.  
  60.  
  61. ## -------------- ##
  62. ## Uninstalling.  ##
  63. ## -------------- ##
  64.  
  65. if %?INSTALL%
  66. .PHONY uninstall-am: uninstall-%DIR%SCRIPTS
  67. uninstall-%DIR%SCRIPTS:
  68.     @$(NORMAL_UNINSTALL)
  69. ?!BASE?    @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
  70. ?!BASE?    list='$(%DIR%_SCRIPTS)'; for p in $$list; do \
  71. ?BASE?    @list='$(%DIR%_SCRIPTS)'; for p in $$list; do \
  72. ?!BASE?      case $$p in \
  73. ?!BASE?        $(srcdir)/*) p=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
  74. ?!BASE?      esac; \
  75. ## Remove any leading directory before applying $(transform).
  76.       f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
  77. ## Prepend the directory part if nobase_ is used.
  78. ?!BASE?      f=`echo "$$p" | sed 's|[^/]*$$||'`"$$f"; \
  79.       echo " rm -f '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
  80.       rm -f "$(DESTDIR)$(%NDIR%dir)/$$f"; \
  81.     done
  82. endif %?INSTALL%
  83.  
  84.  
  85. ## -------------- ##
  86. ## Distributing.  ##
  87. ## -------------- ##
  88.  
  89. if %?DIST%
  90. DIST_COMMON += %DISTVAR%
  91. endif %?DIST%
  92.  
  93.  
  94. ## ---------- ##
  95. ## Checking.  ##
  96. ## ---------- ##
  97.  
  98. if %?CK-OPTS%
  99. .PHONY installcheck-am: installcheck-%DIR%SCRIPTS
  100. installcheck-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
  101.     bad=0; pid=$$$$; list="$(%DIR%_SCRIPTS)"; for p in $$list; do \
  102.       case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
  103. ## Match $(srcdir)/$$p in addition to $$p because Sun make might rewrite
  104. ## filenames in AM_INSTALLCHECK_STD_OPTIONS_EXEMPT during VPATH builds.
  105.        *" $$p "* | *" $(srcdir)/$$p "*) continue;; \
  106.       esac; \
  107. ## Strip any leading directory before applying $(transform).
  108.       f=`echo "$$p" | sed 's,^.*/,,;$(transform)'`; \
  109. ## Insert the directory back if nobase_ is used.
  110. ?!BASE?      f=`echo "$$p" | sed 's|[^/]*$$||'`"$$f"; \
  111.       for opt in --help --version; do \
  112.         if "$(DESTDIR)$(%NDIR%dir)/$$f" $$opt > c$${pid}_.out 2> c$${pid}_.err \
  113.          && test -n "`cat c$${pid}_.out`" \
  114.          && test -z "`cat c$${pid}_.err`"; then :; \
  115.         else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
  116.       done; \
  117.     done; rm -f c$${pid}_.???; exit $$bad
  118. endif %?CK-OPTS%
  119.